{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class=""><a href="{:url('admin/auth_group/index')}">权限组</a></li>
            <li class="layui-this">添加权限组</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form form-container" action="{:url('admin/auth_group/save')}" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="title" value="" required  lay-verify="required" placeholder="请输入权限组名称" class="layui-input">
                        </div>
                    </div>


                    <div class="layui-tab-item layui-show">
                        <label class="layui-form-label">权限分配</label>
                        <table class="layui-table">
                            <thead>
                            <tr>

                                <th>操作</th>
                                <th style="width: 30px;">ID</th>
                                <th style="width: 30px;">排序</th>
                                <th>菜单名称</th>
                                <th>控制器方法</th>
                                <th>状态</th>

                            </tr>
                            </thead>
                            <tbody>
                            {foreach name="admin_menu_level_list" item="vo"}
                            <tr>
                                <td><input type="checkbox" name="{$vo.id}"> </td>
                                <td>{$vo.id}</td>
                                <td>{$vo.sort}</td>
                                <td>{neq name="vo.level" value="1"}|{php}for($i=1;$i<$vo['level'];$i++){echo ' ----';}{/php}{/neq} {$vo.title}</td>
                                <td>{$vo.name}</td>
                                <td>{php}echo $vo['status']==1 ? '显示' : '隐藏';{/php}</td>

                            </tr>
                            {/foreach}
                            </tbody>
                        </table>
                    </div>



                    <div class="layui-form-item">
                        <label class="layui-form-label">状态</label>
                        <div class="layui-input-block">
                            <input type="radio" name="status" value="1" title="启用" checked="checked">
                            <input type="radio" name="status" value="0" title="禁用">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="*">保存</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}